Skip to content

feat(desktop): a pull request pane is keyed by repository and number - #7823

Merged
saddlepaddle merged 1 commit into
mainfrom
pr-pane-identity
Sep 24, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
pr-pane-identity

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

What

The workspace PR pane is identified by the PR's own key, { repoFullName, number }, instead of { prNumber } plus whatever project the workspace happened to have. Every opener feeds it: sidebar chip, Workspaces list row, ShipControl's toast, the diff pane's PR link, the Changes menu, the Review tab title, and the browser pane's "Open in app" (which no longer needs a matching project to show).

Two sources, one shape. @superset/shared/pull-request owns the vocabulary (PullRequestDetail, checks, state, review decision). The API normalizes once (getByBranches now returns it; new integration.github.getPullRequest serves content by repo + number with the installation token). The host's gh pr view output maps into it through fromHostPullRequestContent.

Source rule (usePullRequestPaneDetail): the workspace's host when its project is the PR's repository — the person's own gh, no GitHub App needed, unchanged for local and remote hosts — else the API, which is what a closed cloud box or a PR in a repo nobody has checked out needs. The API query waits for host projects to answer so it never fires speculatively. Threads and close/merge stay host-side for the workspace's linked PR. The /pull-requests page is host-only as before.

Why

A number only means something inside a repository. Borrowing the repo from the workspace broke on cloud boxes ("Choose a project from Pull requests…" while the host row hadn't arrived) and is ambiguous once a workspace has several repos (#7699, cloud_workspace_repositories).

Verified

Dev app, real clicks over CDP:

  • Sidebar chip → pane for fix(desktop): open a cloud workspace at its address instead of behind its wake #7784: title, Merged, author, branch, body, 22 checks; network shows only the host's pullRequests.getContent.
  • ⌘⇧B → github.com/superset-sh/mastra/pull/9 → "Open in app" → pane called only integration.github.getPullRequest (no host call). It rendered the error state because the dev .env's GitHub App isn't the one behind the prod installation row; the same request is verified on prod after deploy (closed box + test: cloud sidebar PR chip proof (close me) #7799).
  • Desktop tests 253/253 (incl. rewritten openPullRequestPaneInStore and getPullRequestTarget suites), trpc, i18n 157/157; root typecheck 42/42; the one new server-error string is translated in all 16 locales.

Existing saved PR panes carry the old { prNumber } shape and show an error until reopened — panes are transient, and reopening is one click.

Follow-ups (not in this PR)

  • The /pull-requests/$prNumber page keyed by repo, so a PR opens there without a project too.
  • Collapse the remaining PR shapes (V2WorkspacePrSummary, LinkedPR, DashboardSidebarWorkspacePullRequest, PRIcon.PRState, the host's two state enums) onto the shared type.
  • Lift pullRequestRef, the adapter and the source rule into a package mobile can import, alongside the cloud-workspace sync logic.

https://claude.ai/code/session_01RL946q6aRucLVJs659sW24


Summary by cubic

Keys the workspace PR pane by { repoFullName, number } instead of the pane's { prNumber } plus whatever project the workspace had open, so a PR opens even when no host has that repo checked out (cloud boxes, multi-repo workspaces).

The pane reads from the workspace's host when its project is the PR's repository, and falls back to the new integration.github.getPullRequest using the GitHub App installation otherwise. All openers now pass the ref parsed from the PR URL, and @superset/shared/pull-request unifies the detail shape across the API and host output.

Migration

  • Existing saved PR panes with the old { prNumber } shape show an error until reopened; panes are transient and reopening restores them.

Written for commit 98ba9cc. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features
    • Open pull requests in workspace panes using their repository and number, including pull requests from repositories not linked to a project.
    • View pull-request details from GitHub when available, including author, branch, review, and check information.
    • See a translated message when a repository isn’t covered by the GitHub App installation.
  • Bug Fixes
    • Improved pull-request matching across repositories and ensured links that can’t be recognized still open in a browser tab.
    • Corrected merge confirmation details and pull-request information displayed in the interface.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 22d3c80d-5870-41f4-95bd-e70e46d3f746

📥 Commits

Reviewing files that changed from the base of the PR and between 65da26d and 98ba9cc.

📒 Files selected for processing (55)
  • apps/desktop/src/renderer/components/OpenBrowserPageInAppButton/OpenBrowserPageInAppButton.tsx
  • apps/desktop/src/renderer/components/OpenBrowserPageInAppButton/utils/getPullRequestTarget/getPullRequestTarget.test.ts
  • apps/desktop/src/renderer/components/OpenBrowserPageInAppButton/utils/getPullRequestTarget/getPullRequestTarget.ts
  • apps/desktop/src/renderer/lib/github/pullRequestRef.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarExpandedWorkspaceRow/DashboardSidebarExpandedWorkspaceRow.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/hooks/useSidebarCloudPullRequests/toSidebarPullRequest.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/pull-requests/components/PullRequestDetailHeader/PullRequestDetailHeader.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/pull-requests/hooks/usePullRequestDetail/usePullRequestDetail.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/pull-requests/utils/fromHostPullRequestContent/fromHostPullRequestContent.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/pull-requests/utils/fromHostPullRequestContent/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/ChangesControl.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/components/PRStatusGroup/PRStatusGroup.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/ChangesControl/components/ShipControl/ShipControl.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/WorkspaceSidebar.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useReviewTab/components/PRHeader/PRHeader.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useReviewTab/components/ReviewTabContent/ReviewTabContent.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useReviewTab/useReviewTab.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/BrowserPane/components/BrowserPaneToolbar/utils/replaceBrowserPane/replaceBrowserPane.test.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffPaneHeaderExtras/components/DiffPanePRLink/DiffPanePRLink.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/PullRequestPane/PullRequestPane.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/PullRequestPane/components/PullRequestPaneHeaderExtras/PullRequestPaneHeaderExtras.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/PullRequestPane/hooks/usePullRequestPaneDetail/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/PullRequestPane/hooks/usePullRequestPaneDetail/usePullRequestPaneDetail.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/PullRequestPane/hooks/usePullRequestPaneProject/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/PullRequestPane/hooks/usePullRequestPaneProject/usePullRequestPaneProject.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/usePaneRegistry.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePullRequestPaneIntentOpener/usePullRequestPaneIntentOpener.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useWorkspacePaneOpeners/useWorkspacePaneOpeners.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/types.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/utils/openPullRequestPaneInStore/openPullRequestPaneInStore.test.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/utils/openPullRequestPaneInStore/openPullRequestPaneInStore.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesList/components/V2WorkspaceRow/V2WorkspaceRow.tsx
  • apps/desktop/src/renderer/stores/pull-request-pane-intent.ts
  • packages/i18n/locales/cs/messages.po
  • packages/i18n/locales/de/messages.po
  • packages/i18n/locales/en/messages.po
  • packages/i18n/locales/es/messages.po
  • packages/i18n/locales/fr/messages.po
  • packages/i18n/locales/id/messages.po
  • packages/i18n/locales/it/messages.po
  • packages/i18n/locales/ja/messages.po
  • packages/i18n/locales/ko/messages.po
  • packages/i18n/locales/nl/messages.po
  • packages/i18n/locales/pl/messages.po
  • packages/i18n/locales/pt-BR/messages.po
  • packages/i18n/locales/ru/messages.po
  • packages/i18n/locales/tr/messages.po
  • packages/i18n/locales/vi/messages.po
  • packages/i18n/locales/zh-CN/messages.po
  • packages/i18n/locales/zh-TW/messages.po
  • packages/i18n/src/server-errors.ts
  • packages/shared/package.json
  • packages/shared/src/pull-request.ts
  • packages/trpc/src/router/integration/github/github.ts
  • packages/trpc/src/router/integration/github/pull-request-shape.ts
 ________________________
< Code review is my jam. >
 ------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@expo

expo Bot commented Sep 24, 2026

Copy link
Copy Markdown

No installed development build can load this pull request as an update: its native fingerprint is 63273df0c28c and no development build has it. Add the mobile-build label to build one.

The pane's data was `{ prNumber }` and it borrowed the repository from
whatever workspace it was open in, so it needed a project to render and
showed "Choose a project" on a cloud workspace whose host row had not
arrived. A number only means something inside a repository; with
multi-repo workspaces the borrowed one is ambiguous, and with cloud
boxes it is absent.

The pane, the intent store and every opener now carry the PR's own
identity, `{ repoFullName, number }`, parsed from the PR's URL where an
opener only had that. One vocabulary for what a PR looks like lives in
@superset/shared/pull-request; the API builds it once from the webhook
row (getByBranches now returns it normalized) and the host's `gh pr view`
output maps into it through one adapter. A new integration.github.
getPullRequest serves a PR's content by repository and number with the
installation's token.

The pane reads through the workspace's host when its project is the PR's
repository — the person's own gh, no GitHub App required, unchanged for
every local and remote host — and through the API otherwise, which is
what a closed cloud box or a PR in a repository nobody has checked out
needs. Threads and the close/merge actions stay host-side for the
workspace's linked PR.

Claude-Session: https://claude.ai/code/session_01RL946q6aRucLVJs659sW24
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@saddlepaddle
saddlepaddle merged commit 807a93b into main Sep 24, 2026
21 of 22 checks passed
superset-app Bot pushed a commit that referenced this pull request Sep 24, 2026
`bunx turbo run typecheck` failed on CI while passing on the branch alone: CI
builds the PR's merge commit, and this is a semantic conflict main and the
branch each look fine on their own.

  src/router/integration/github/github.ts(332,9): error TS2552:
    Cannot find name 'githubRepositories'. Did you mean 'listGithubRepositories'?

#7823 added `getPullRequest`, which resolves a repository straight off
`githubRepositories`; this branch dropped that import because nothing here read
the table any more. Git merged both hunks cleanly and the result does not
compile.

Fixing the import alone would have compiled and reopened the hole. That
procedure answers with the *installation's* token, so on the merged tree it
handed any org member the title, body, author and branches of a pull request in
the owner's private repository — the boundary this branch exists to close,
arriving through a door that did not exist when the branch was cut. It now
resolves through `listGithubRepositories`, the gated reader every other query
procedure here already goes through, which removes the dangling symbol and
closes the door in one change. An unreachable repository reads as "not a
repository the GitHub App is installed on", so the refusal does not confirm that
a private repository exists.

Regression test added alongside the other listing-door cases.

Refs SUPER-2432, SUPER-2022
saddlepaddle added a commit that referenced this pull request Sep 25, 2026
…ository (#7869)

A pull-request pane persisted by an earlier build stores only its number,
so after #7823 re-keyed the pane by repository and number, reopening a
workspace that still had one open threw while rendering the pane header and
took down the workspace view. The read-time layout heal now removes such a
pane from its tab, promoting its split sibling, and drops a tab left empty.

Refs DESKTOP-1BT
Kitenite added a commit that referenced this pull request Oct 1, 2026
* docs: weekly update for PRs merged 2026-09-23 to 2026-09-30

Source of truth: live Notion SOP "Weekly Docs Update (automation SOP)".
Window: merged:>=2026-09-23 (139 PRs). PRs through the morning of 09-23
were covered by #7771.

Changes
- Pages: no auto-open on publish (#7790); page links and URL links split
  into their own settings (#7916, #7962, #7946); Listening agents menu with
  per-row stop and Add listening agent (#7724, #7820, #7919); globe on the
  Share button (#7766); Report on public pages (#7886); agents offer a page
  (#7759). Files: pages.mdx, cli/cli-reference.mdx.
- Settings moves: Links replaced by Browser and Files & Editor (#7916,
  #7962). Files: editor.mdx, terminal-integration.mdx, customization.mdx.
- Editor: inline rename and drag to move (#7692), Auto Save (#7693, #7916),
  open and save files outside the workspace (#7897, #7982), Copy as Markdown
  (#7591), per-pane error screen (#7983). File: editor.mdx.
- Terminal copy follows Ghostty's whitespace rules (#7868).
  File: terminal-integration.mdx.
- Agents: UFO (#7898); GPT-6 Astra, Sonnet 5.5, retiring GPT-5.5, retired
  GPT-5.4/5.3 Codex (#7783, #7894, #7935). Files: agent-integration.mdx,
  cli/cli-reference.mdx.
- Host: superset start --daemon --auto-update and update-lock permission
  errors (#7735, #7952). Files: cli/host-server.mdx, cli/cli-reference.mdx.
- Removed the mcp CLI section and the Connected Service Plugins section:
  #7776 made plugins/mcp internal, the Plugins page is staff-flagged, and
  apps/docs/AGENTS.md keeps internal commands out. Files: skills.mdx,
  cli/cli-reference.mdx.
- Slack page unfurls and details panel (#7817, #7821, #7914, #7957).
  File: use-with-slack.mdx.
- Workspaces: instant creation with background naming (#7518); recoverable
  project deletion (#7896). File: workspaces.mdx.
- Shortcuts: prev/next workspace includes Pinned and wraps (#7851); ⌘B
  collapses the sidebar to a rail (#7964). File: keyboard-shortcuts.mdx.
- Ship controls and open-in button moved to the right sidebar strip (#7958).
  Files: diff-viewer.mdx, use-with-ide.mdx.

Deliberately skipped
- Cloud workspaces/environments/sandboxes (flag-gated, AGENTS.md rule):
  #7784 #7795 #7824 #7840 #7844 #7845 #7847 #7849 #7850 #7858 #7861 #7863
  #7874 #7911 #7913 #7918 #7922 #7931 #7932 #7937 #7956 #7961 #7969 #7981
  #7637 #7794 #7789 #7838 (its CLI docs already shipped in the PR).
- Staff-only plugins: #7912 Sentry plugin, #7716, #7727, #7955.
- Already documented in their own PRs: #7917, #7921.
- Removed feature never documented: #7796 Google Calendar triggers.
- Agents chip remove/revert/default-off, never documented: #7870 #7871 #7872.
- Billing/backend policy with no docs surface: #7947, #7812, #7786, #7792,
  #7798, #7761, #7948, #7949, #7951, #7827.
- Reverted security trio: #7828 #7829 #7830 (reverted by #7834).
- Fixes restoring expected behavior: #7683 #7696 #7707 #7743 #7751 #7756
  #7764 #7765 #7781 #7788 #7791 #7823 #7825 #7833 #7837 #7852 #7857 #7860
  #7864 #7865 #7869 #7873 #7897-covered #7903 #7938 #7980 #7943 #7964-chrome.
- Mobile (no docs page): #7746 #7747 #7748 #7749 #7750 #7782 #7793 #7810
  #7814 #7816 #7889 #7968.
- Marketing, internal docs, CI, version bumps: #7651 #7744 #7752 #7771 #7774
  #7776-infra #7777 #7785 #7811 #7818 #7822 #7826 #7834 #7884 #7885 #7895
  #7909 #7933 #7934 #7942 #7944 #7965 #7966.

Validation: bun run --cwd apps/docs typecheck, bun run lint:fix,
bun run lint (exit 0), Vale on 13 changed files (0 errors, 0 warnings),
git diff --check.

* chore: log weekly docs update follow-ups

* docs: tighten review findings in the weekly update

Only the page creator can stop or add listening agents. On focus change also
saves on window blur, and Auto Save pauses on conflicts. Taken-down pages do
not unfurl. Model picker coverage matches agent-models.ts.

This branch was previously deployed

1 inactive deployment
preview — 98ba9cce Deployed Sep 24, 2026 by saddlepaddle via Deploy Admin #10350
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant